//
//  HomeBannerCell.m
//  PaiLeXiongProject
//
//  Created by 小獾科技 on 2017/8/17.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "HomeBannerCell.h"


@interface HomeBannerCell ()<SDCycleScrollViewDelegate>

@property (nonatomic, strong) SDCycleScrollView *cycleScrollview;
@end
@implementation HomeBannerCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        _cycleScrollview = [SDCycleScrollView new];
        _cycleScrollview.hidesForSinglePage = NO;
        _cycleScrollview.delegate = self;
        [self addSubview:self.cycleScrollview];
        [_cycleScrollview mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(self);
            make.bottom.equalTo(self);
            make.left.and.right.equalTo(self);
        }];
        
    }
    return self;
}

- (void)configWithView:(NSArray *)imageArray
{
    _cycleScrollview.imageURLStringsGroup = imageArray;
}

- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index
{
    [GW_webView handleWebView:self.actionArray[index] viewController:self.viewcontroller titleName:nil goodid:nil];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
